> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/mlfoundations/open_clip/llms.txt
> Use this file to discover all available pages before exploring further.

# list_pretrained

> List all available pretrained model/weight combinations

Returns a list of all pretrained models with their available weight tags. This shows which pretrained checkpoints are available for each model architecture.

## Signature

```python theme={null}
def list_pretrained(as_str: bool = False):
    ...
```

## Parameters

<ParamField path="as_str" type="bool" default="False">
  If True, returns list of strings in format `'model_name:tag'`. If False, returns list of tuples `(model_name, tag)`.
</ParamField>

## Returns

<ResponseField name="pretrained_list" type="list">
  List of pretrained model/tag combinations. Format depends on `as_str` parameter:

  * If `as_str=False`: List of tuples `[(model_name, tag), ...]`
  * If `as_str=True`: List of strings `['model_name:tag', ...]`
</ResponseField>

## Example

```python theme={null}
import open_clip

# Get list as tuples (default)
pretrained = open_clip.list_pretrained()
print(f"Total pretrained combinations: {len(pretrained)}")
print(f"First 5: {pretrained[:5]}")
# Output: [('RN50', 'openai'), ('RN50', 'yfcc15m'), ('RN50', 'cc12m'), ...]

# Get list as strings
pretrained_str = open_clip.list_pretrained(as_str=True)
print(f"First 5 as strings: {pretrained_str[:5]}")
# Output: ['RN50:openai', 'RN50:yfcc15m', 'RN50:cc12m', ...]

# Find all pretrained weights for a specific model
vit_b_32_weights = [tag for model, tag in pretrained if model == 'ViT-B-32']
print(f"ViT-B-32 available weights: {vit_b_32_weights}")
# Output: ['openai', 'laion400m_e31', 'laion400m_e32', 'laion2b_e16', ...]

# Find all models with OpenAI weights
openai_models = [model for model, tag in pretrained if tag == 'openai']
print(f"Models with OpenAI weights: {openai_models}")
# Output: ['RN50', 'RN101', 'RN50x4', 'RN50x16', 'RN50x64', 'ViT-B-32', ...]

# Check if a specific combination exists
if ('ViT-L-14', 'datacomp_xl_s13b_b90k') in pretrained:
    print("ViT-L-14 with datacomp_xl_s13b_b90k is available")
```

## Common Pretrained Tags

* **openai**: Official OpenAI CLIP weights
* **laion400m\_e31/e32**: Trained on LAION-400M dataset
* **laion2b\_s34b\_b88k**: Trained on LAION-2B dataset
* **datacomp\_xl\_s13b\_b90k**: Trained on DataComp-XL
* **metaclip\_400m/fullcc**: MetaCLIP weights
* **dfn2b/dfn5b**: Apple DFN weights
* **webli**: Google SigLIP weights trained on WebLI

## Helper Functions

For more targeted queries, consider using:

```python theme={null}
# Get all pretrained tags for a specific model
tags = open_clip.list_pretrained_tags_by_model('ViT-B-32')
print(f"ViT-B-32 tags: {tags}")

# Get all models with a specific tag
models = open_clip.list_pretrained_models_by_tag('openai')
print(f"Models with OpenAI weights: {models}")

# Check if a specific model/tag combination exists
exists = open_clip.is_pretrained_cfg('ViT-B-32', 'openai')
print(f"ViT-B-32:openai exists: {exists}")
```

## See Also

* [get\_pretrained\_cfg](/api/get-pretrained-cfg) - Get configuration for a specific pretrained model/tag
* [list\_models](/api/list-models) - List available model architectures
* [create\_model](/api/create-model) - Create a model with pretrained weights
